﻿<Window x:Class="remes.BLoc.UI.SelectTargetLanguagesDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:remes.BLoc.UI"
        Title="SelectTargetLanguagesDialog" Height="300" Width="300">

  <DockPanel Margin="3">
    <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
      <Button Content="Ok" x:Name="OkButton" Margin="3" Padding="2,1" MinWidth="75" IsDefault="True" Click="OkButton_Click"/>
      <Button Content="Cancel" x:Name="CancelButton" Margin="3" Padding="2,1" MinWidth="75" IsCancel="True"/>
    </StackPanel>

    <ListBox x:Name="LanguageList" Margin="3"
             ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Path=Languages}">
      <ListBox.Resources>
        <DataTemplate DataType="{x:Type local:SelectableLanguageTuple}">
          <CheckBox Content="{Binding Path=Language}" IsChecked="{Binding Path=IsSelected, Mode=TwoWay}"/>
        </DataTemplate>
      </ListBox.Resources>
    </ListBox>
  </DockPanel>
</Window>
